package demo.user.action;

import com.onlyxiahui.framework.action.dispatcher.annotation.ActionMapping;

import demo.user.bean.User;

/**
 * Description <br>
 * Date 2020-03-29 13:37:54<br>
 * 
 * @author XiaHui [onlovexiahui@qq.com]<br>
 * @since 1.0.0
 */
@ActionMapping("user")
public class UserAction {

	@ActionMapping("add")
	public void add(User user) {
		System.out.println(user);
	}

	/**
	 * 
	 * order 小覆盖大的值<br>
	 * Date 2020-06-11 15:19:02<br>
	 * 
	 * @param user
	 * @since 1.0.0
	 */
	@ActionMapping(value = "add", order = 0)
	public void add1(User user) {
		System.out.println(user);
	}

	@ActionMapping("all")
	public void all(User user) {
		System.out.println(user);
	}

	@ActionMapping("/get")
	public User get(String id) {
		System.out.println(id);

		User u = new User();
		u.setId(id);

		return u;
	}
}
